#ifndef _POINT_H_
#define _POINT_H_

#define MAX_X 79
#define MAX_Y 24
#define MIN_X 0
#define MIN_Y 0

#include <iostream>
#include "ScreenH.h"
using namespace std;

void gotoxy(int, int); // prototype

class Point
{
	int m_x, m_y;
	int dir_x, dir_y;
	char m_symb;
	bool flag;

public:
	
	Point(){ //constructor
		m_symb = '*';
		dir_x = dir_y = m_x = m_y = 0;
        flag = false;
	}; 
	Point (int x, int y) : m_x(x), m_y(y), m_symb('*'){};

	void setPos(int x, int y);

	void getPos(int &x, int&y);

	int getx()const {return m_x;}

	int gety()const {return m_y;}

	void setSymbol(char c);

	char getSymbol()const{return m_symb;}

	void draw(char c);
	
	static void printPoint(const Point p, Screen * myscr = NULL, char symbol = '*');

	void move();

	bool isEqual(Point p);

	void setMove(int x, int y);

	static bool isValidPoint (const int x, const int y) ; 
	
	Point operator+(const Point &p2)const;

	friend bool operator==(const Point &p1, const Point &p2)
	{
		if(p1.m_x == p2.m_x && p1.m_y == p2.m_y) return true;
		return false;
	}
};
#endif